package com.CusterRelSys.service.impl;

import com.CusterRelSys.entity.VOrdersLine;
import com.CusterRelSys.entity.VProuduct;
import com.CusterRelSys.mapper.VOrdersLineMapperNY;
import com.CusterRelSys.service.VOrdersLineMapperServiceNY;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/12/2.
 */
@Service
public class VOrdersLineMapperServiceImplNY implements VOrdersLineMapperServiceNY{

    @Autowired
    private VOrdersLineMapperNY vOrdersLineMapperNY;
    @Override
    public List<Integer> findVOrdersLineByOddOrderId(String oddOrderId) {
        List vList=new ArrayList();
        List<VOrdersLine> vOrdersLineList = vOrdersLineMapperNY.findVOrdersLineByOddOrderId(oddOrderId);
        for (VOrdersLine vOrdersLine : vOrdersLineList) {
            vList.add(vOrdersLine.getOddProdId());
        }
        return vList;
    }

    @Override
    public VProuduct findProductByProdId(Integer prodId) {
        VProuduct vProuduct = vOrdersLineMapperNY.findProductByProdId(prodId);
        return vProuduct;
    }
}
